cmake_minimum_required(VERSION 3.5)
project(Zigbee3-Coordinator)

set(CMAKE_CXX_STANDARD 11)

add_definitions(-DUART_BAUD_RATE=115200)
add_definitions(-DCOORDINATOR)
add_definitions(-DCRC_XOR)
add_definitions(-DAPP_AHI_CONTROL)
add_definitions(-DJN516x=5160)
add_definitions(-DJN5169=5169)
add_definitions(-DJENNIC_CHIP_NAME=_JN5169)
add_definitions(-DJENNIC_CHIP_FAMILY_NAME=_JN516x)
add_definitions(-DJENNIC_CHIP_FAMILY=JN516x)
add_definitions(-DWATCHDOG_ENABLED)
add_definitions(-DJENNIC_HW_BBC_RXINCCA=1)
add_definitions(-DJENNIC_HW_BBC_DMA=1)
add_definitions(-DJENNIC_HW_BBC_ISA=0)
add_definitions(-DJENNIC_SW_EXTERNAL_FLASH=0)
add_definitions(-DJN516X_DMA_UART_BACKWARDS_COMPATIBLE_API=1)
add_definitions(-DUART_BACKWARDS_COMPATIBLE_API=1)
add_definitions(-DRXPOWERADJUST_SUPPORT)
add_definitions(-DJENNIC_CHIP_JN5169)
add_definitions(-DJENNIC_CHIP_FAMILY_JN516x)
add_definitions(-DJENNIC_STACK_ZCL)
add_definitions(-DJENNIC_MAC_MiniMacShim)
add_definitions(-DEMBEDDED)
add_definitions(-DJENNIC_PCB=DEVKIT4)
add_definitions(-DJENNIC_PCB_DEVKIT4)
add_definitions(-DPDM_USER_SUPPLIED_ID)
add_definitions(-DPDM_NO_RTOS)
add_definitions(-DPDM_EEPROM)
add_definitions(-DDBG_ENABLE)
add_definitions(-DZPS_APL_OPT_SINGLE_INSTANCE)
add_definitions(-DOTA_NO_CERTIFICATE)
add_definitions(-DPLME_SAP)
add_definitions(-DZBPRO_DEVICE_TYPE_ZCR)
add_definitions(-DBDB_SUPPORT_NWK_STEERING)
add_definitions(-DBDB_SUPPORT_NWK_FORMATION)
add_definitions(-DBDB_SUPPORT_OOBC)


include_directories(Source/ZigbeeNodeControlBridge)
include_directories(Source/ZigbeeNodeControlBridge/..)
include_directories(Source/Common)

include_directories(../../sdk/JN-SW-4170/Components/Common/Include)
include_directories(../../sdk/JN-SW-4170/Platform/DK4/Include)
include_directories(../../sdk/JN-SW-4170/Platform/Common/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZigbeeCommon/Include)
include_directories(../../sdk/JN-SW-4170/Components/Random/Include)
include_directories(../../sdk/JN-SW-4170/Components/Aes/Include)
include_directories(../../sdk/JN-SW-4170/Components/HardwareAPI/Include)
include_directories(../../sdk/JN-SW-4170/Components/HardwareAPI/Source)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Source/OutOfBand)
include_directories(../../sdk/JN-SW-4170/Components/AppApi/Include)
include_directories(../../sdk/JN-SW-4170/Components/MAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/MiniMac/Include)
include_directories(../../sdk/JN-SW-4170/Components/MMAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/HardwareAPI/Include)
include_directories(../../sdk/JN-SW-4170/Components/Aes/Include)
include_directories(../../sdk/JN-SW-4170/Components/DBG/Include)
include_directories(../../sdk/JN-SW-4170/Components/Mac/Include)
include_directories(../../sdk/JN-SW-4170/Components/MicroSpecific/Include)
include_directories(../../sdk/JN-SW-4170/Components/MiniMAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/MMAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/TimerServer/Include)
include_directories(../../sdk/JN-SW-4170/Components/Random/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZigbeeCommon/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSMAC_Mini_SOC/Include)
include_directories(../../sdk/JN-SW-4170/Components/PWRM/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSTSV/Include)
include_directories(../../sdk/JN-SW-4170/Components/AES_SW/Include)
include_directories(../../sdk/JN-SW-4170/Components/PDUM/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSAPL/Include)
include_directories(../../sdk/JN-SW-4170/Components/Random/Include)
include_directories(../../sdk/JN-SW-4170/Components/PDM_EEPROM_NO_RTOS/Include)
include_directories(../../sdk/JN-SW-4170/Components/DBG/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSNWK/Include)
include_directories(../../sdk/JN-SW-4170/Components/PDM/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSMAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZPSNWK/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZigbeeCommon/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCIF/Source)
include_directories(../../sdk/JN-SW-4170/Components/ZCIF/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/General/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/General/Source)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/MeasurementAndSensing/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/Lighting/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/HVAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/Closures/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/SecurityAndSafety/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/SmartEnergy/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/OTA/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/Commissioning/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/ApplianceManagement/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Clusters/GreenPower/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/Generic/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZLO/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/HVAC/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/Closures/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/SecurityAndSafety/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/SmartEnergy/Include)
include_directories(../../sdk/JN-SW-4170/Components/ZCL/Devices/ZHA/ApplianceManagement/Include)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Include)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Source/Common)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Source/NwkSteering)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Source/NwkFormation)
include_directories(../../sdk/JN-SW-4170/Components/BDB/Source/OutOfBand)


add_executable(JN_AN_1216_Zigbee_3_0_IoT_ControlBridge
        Build/ZigbeeNodeControlBridge/Makefile
        Build/build.sh
        Source/Common/app_common.h
        Source/Common/app_events.h
        Source/Common/StackMeasure.c
        Source/Common/StackMeasure.h
        Source/Common/uart.c
        Source/Common/uart.h
        Source/ZigbeeNodeControlBridge/app_ahi_commands.c
        Source/ZigbeeNodeControlBridge/app_ahi_commands.h
        Source/ZigbeeNodeControlBridge/app_general_events_handler.c
        Source/ZigbeeNodeControlBridge/app_green_power.c
        Source/ZigbeeNodeControlBridge/app_green_power.h
        Source/ZigbeeNodeControlBridge/app_ota_server.c
        Source/ZigbeeNodeControlBridge/app_ota_server.h
        Source/ZigbeeNodeControlBridge/app_power_on_counter.c
        Source/ZigbeeNodeControlBridge/app_power_on_counter.h
        Source/ZigbeeNodeControlBridge/app_start.c
        Source/ZigbeeNodeControlBridge/app_zcl_event_handler.c
        Source/ZigbeeNodeControlBridge/app_zcl_event_handler.h
        Source/ZigbeeNodeControlBridge/app_Znc_cmds.c
        Source/ZigbeeNodeControlBridge/app_Znc_cmds.h
        Source/ZigbeeNodeControlBridge/bdb_options.h
        Source/ZigbeeNodeControlBridge/Log.h
        Source/ZigbeeNodeControlBridge/PDM_IDs.h
        Source/ZigbeeNodeControlBridge/SerialLink.c
        Source/ZigbeeNodeControlBridge/SerialLink.h
        Source/ZigbeeNodeControlBridge/zcl_options.h)
